package com.sys.user.base.persistence;


import com.sys.core.init.mysql.BaseEntity;

import java.util.List;
import java.util.Map;

/**
 * Created by 汤伟杰 on 2017/6/2.
 */
public interface BaseMapper<T extends BaseEntity> {
    void insert(T t);
    void update(T t);
    void deleteById(String id);
    void deleteByIds(List<String> list);
    T queryById(String id);
    List<T> queryByIds(List<String> list);
    void saves(List<T> list);
    int getTotalRows(Map<String, Object> param);
    List<Map<String,Object>> getList(Map<String, Object> param);

    int getApiTotalRows(Map<String, Object> params);
    List<Map<String,Object>> getApiList(Map<String, Object> param);

    Map<String,Object> getApiDetail(Map<String, Object> params);

    T queryByOne(Map<String, Object> param);
}
